package org.hy.corn_task.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.RequiredArgsConstructor;
import org.hy.corn_task.pojo.entity.source.Dept;
import org.hy.corn_task.service.source.DeptService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 测试接口
 */
@RestController
@RequestMapping("/sys")
@RequiredArgsConstructor
public class SysController {

    private final DeptService deptService;

    /**
     * 根据状态查询定时调度失败重试记录
     */
    @GetMapping("/queryRetryByStatus/{status}")
    public List<Dept> test() {
        LambdaQueryWrapper<Dept> lqw = new LambdaQueryWrapper<>();
        lqw.le(Dept::getDeptId, 1);
        return deptService.list(lqw);
    }



}
